<?php

class User_Controller_Browse_Signup_Index extends Nuo_Controller
{
	function execute($request)
	{
		$table = Nuo::getTable('user');

		$form = Nuo_Form::factory('user.signup_account');
		
		$form->setAction(Nuo::getUrl('user/signup'));

		if ($request -> isPost() && $form -> isValid($_POST))
		{
			try
			{

				$user = Nuo::getApi('user') -> addUser($form -> getData());
			}
			catch(Exception $e)
			{
				$form -> setNotice($e -> getMessage());
			}
		}

		return   $form;
	}

}
